Optimal. Leaf size=293 \[ -\frac {2 a b \tan ^2(e+f x) \, _2F_1\left (1,\frac {1}{2} (n p+2);\frac {1}{2} (n p+4);-\tan ^2(e+f x)\right ) \left (c (d \tan (e+f x))^p\right )^n}{f \left (a^2+b^2\right )^2 (n p+2)}+\frac {\left (a^2-b^2\right ) \tan (e+f x) \, _2F_1\left (1,\frac {1}{2} (n p+1);\frac {1}{2} (n p+3);-\tan ^2(e+f x)\right ) \left (c (d \tan (e+f x))^p\right )^n}{f \left (a^2+b^2\right )^2 (n p+1)}+\frac {2 b^2 \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n \, _2F_1\left (1,n p+1;n p+2;-\frac {b \tan (e+f x)}{a}\right )}{f \left (a^2+b^2\right )^2 (n p+1)}+\frac {b^2 \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n \, _2F_1\left (2,n p+1;n p+2;-\frac {b \tan (e+f x)}{a}\right )}{a^2 f \left (a^2+b^2\right ) (n p+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.48, antiderivative size = 293, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {6677, 961, 64, 808, 364} \[ -\frac {2 a b \tan ^2(e+f x) \, _2F_1\left (1,\frac {1}{2} (n p+2);\frac {1}{2} (n p+4);-\tan ^2(e+f x)\right ) \left (c (d \tan (e+f x))^p\right )^n}{f \left (a^2+b^2\right )^2 (n p+2)}+\frac {\left (a^2-b^2\right ) \tan (e+f x) \, _2F_1\left (1,\frac {1}{2} (n p+1);\frac {1}{2} (n p+3);-\tan ^2(e+f x)\right ) \left (c (d \tan (e+f x))^p\right )^n}{f \left (a^2+b^2\right )^2 (n p+1)}+\frac {2 b^2 \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n \, _2F_1\left (1,n p+1;n p+2;-\frac {b \tan (e+f x)}{a}\right )}{f \left (a^2+b^2\right )^2 (n p+1)}+\frac {b^2 \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n \, _2F_1\left (2,n p+1;n p+2;-\frac {b \tan (e+f x)}{a}\right )}{a^2 f \left (a^2+b^2\right ) (n p+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 64
Rule 364
Rule 808
Rule 961
Rule 6677
Rubi steps
\begin {align*} \int \frac {\left (c (d \tan (e+f x))^p\right )^n}{(a+b \tan (e+f x))^2} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (c (d x)^p\right )^n}{(a+b x)^2 \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname {Subst}\left (\int \frac {(d x)^{n p}}{(a+b x)^2 \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname {Subst}\left (\int \left (\frac {b^2 (d x)^{n p}}{\left (a^2+b^2\right ) (a+b x)^2}+\frac {2 a b^2 (d x)^{n p}}{\left (a^2+b^2\right )^2 (a+b x)}+\frac {(d x)^{n p} \left (a^2-b^2-2 a b x\right )}{\left (a^2+b^2\right )^2 \left (1+x^2\right )}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname {Subst}\left (\int \frac {(d x)^{n p} \left (a^2-b^2-2 a b x\right )}{1+x^2} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right )^2 f}+\frac {\left (2 a b^2 (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname {Subst}\left (\int \frac {(d x)^{n p}}{a+b x} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right )^2 f}+\frac {\left (b^2 (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname {Subst}\left (\int \frac {(d x)^{n p}}{(a+b x)^2} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right ) f}\\ &=\frac {2 b^2 \, _2F_1\left (1,1+n p;2+n p;-\frac {b \tan (e+f x)}{a}\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (1+n p)}+\frac {b^2 \, _2F_1\left (2,1+n p;2+n p;-\frac {b \tan (e+f x)}{a}\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{a^2 \left (a^2+b^2\right ) f (1+n p)}+\frac {\left (\left (a^2-b^2\right ) (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname {Subst}\left (\int \frac {(d x)^{n p}}{1+x^2} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right )^2 f}-\frac {\left (2 a b (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname {Subst}\left (\int \frac {(d x)^{1+n p}}{1+x^2} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right )^2 d f}\\ &=\frac {\left (a^2-b^2\right ) \, _2F_1\left (1,\frac {1}{2} (1+n p);\frac {1}{2} (3+n p);-\tan ^2(e+f x)\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (1+n p)}+\frac {2 b^2 \, _2F_1\left (1,1+n p;2+n p;-\frac {b \tan (e+f x)}{a}\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (1+n p)}+\frac {b^2 \, _2F_1\left (2,1+n p;2+n p;-\frac {b \tan (e+f x)}{a}\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{a^2 \left (a^2+b^2\right ) f (1+n p)}-\frac {2 a b \, _2F_1\left (1,\frac {1}{2} (2+n p);\frac {1}{2} (4+n p);-\tan ^2(e+f x)\right ) \tan ^2(e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (2+n p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.97, size = 231, normalized size = 0.79 \[ \frac {\tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n \left (\frac {a \left (\left (a^2-b^2\right ) (n p+2) \, _2F_1\left (1,\frac {1}{2} (n p+1);\frac {1}{2} (n p+3);-\tan ^2(e+f x)\right )-2 a b (n p+1) \tan (e+f x) \, _2F_1\left (1,\frac {n p}{2}+1;\frac {n p}{2}+2;-\tan ^2(e+f x)\right )\right )}{\left (a^2+b^2\right ) (n p+1) (n p+2)}-\frac {b^2 \left (a^2 (n p-2)+b^2 n p\right ) \, _2F_1\left (1,n p+1;n p+2;-\frac {b \tan (e+f x)}{a}\right )}{a \left (a^2+b^2\right ) (n p+1)}+\frac {b^2}{a+b \tan (e+f x)}\right )}{a f \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.71, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n}}{b^{2} \tan \left (f x + e\right )^{2} + 2 \, a b \tan \left (f x + e\right ) + a^{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n}}{{\left (b \tan \left (f x + e\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 3.85, size = 0, normalized size = 0.00 \[ \int \frac {\left (c \left (d \tan \left (f x +e \right )\right )^{p}\right )^{n}}{\left (a +b \tan \left (f x +e \right )\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n}}{{\left (b \tan \left (f x + e\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (c\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\right )}^n}{{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (c \left (d \tan {\left (e + f x \right )}\right )^{p}\right )^{n}}{\left (a + b \tan {\left (e + f x \right )}\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________